<?php

class XMLHTTPRequestService
{
}

interface HttpServiceInterface
{
    public function request(string $url, string $type, array $options = []);
}

class XMLHttpService extends XMLHTTPRequestService implements HttpServiceInterface
{
    public function request(string $url, string $type, array $options = [])
    {
        // Implementation of request method.
    }
}

readonly class Http
{
    public function __construct(private HttpServiceInterface $service)
    {
    }

    public function get(string $url, array $options)
    {
        $this->service->request($url, 'GET', $options);
    }

    public function post(string $url, array $options)
    {
        $this->service->request($url, 'POST', $options);
    }
}
